<?php 
define("NEED_AUTH", true);  //需要验证

$num = 1234567890;
echo number_format($num)."<br>";

echo number_format_cn($num);

function number_format_cn($num) {
	$str = '';
	if ($num > 100000000) {
		$a = $num / 100000000;
		$num = $num % 100000000;
		$str .= floor($a).'亿';
	}
	if ($num > 10000) {
		$a = $num / 10000;
		$num = $num % 10000;
		$str .= round($a).'万';
	}
	if ($num != 0) $str.='左右';
	return $str;
}
?>

